import axios from 'axios'

import { ILogisticsInfo, IUpdateCardInfo } from '../interface'
import './__mock__'

/** 获取物流消息 */
export const apiGetLogisticsInfo = async (waybillNo: string): Promise<ILogisticsInfo> => {
  return axios.post(`/tmsapi/waybill_record/getLogisticsInfo`, { waybillNo }).then(res => res.$data)
}

/** 更新卡片信息 */
export const apiUpdateCardInfo = async (params: IUpdateCardInfo): Promise<void> => {
  return axios.post(`/tmsapi/waybill_record/updateCardInfo`, { ...params }).then(res => res.$data)
}
